﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication7
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Введите число");
            int counter = 1;
            int max = 0;
            int min = 9;
            int number = Int32.Parse(Console.ReadLine());
            while (number / 10 > 0)
            {
                counter++;
                int digit = number % 10;
                number = number / 10;
                if (digit > max)
                    max = digit;
                if (digit < min) ;
                min = digit;

            }
            }
                          }

        

        }


    
